home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / win_u_z / vbclk2.zip / VBCLOCK.BAS < prev    next >
BASIC Source File  |  1992-08-31  |  1KB  |  52 lines

  1.  
  2. Function Pixels_To_Twips (ByVal N&) As Long
  3.   Pixels_To_Twips = Scale_Twip / Scale_Pixel * N&
  4. End Function
  5.  
  6. Static Function Signed (XNum&) As Integer
  7.     If XNum& > 32767 Then
  8.        Signed = XNum& - 65536
  9.     Else
  10.        Signed = XNum&
  11.     End If
  12. End Function
  13.  
  14. Function TrimZeroTerm$ (s$)
  15.     Dim temp As String
  16.     Dim nullspot As Integer
  17.  
  18.     temp = String$(1, 0)
  19.     nullspot = InStr(s$, temp)
  20.     If nullspot = 0 Then
  21.         TrimZeroTerm = s$
  22.       Else
  23.         TrimZeroTerm = Left$(s$, nullspot - 1)
  24.     End If
  25. End Function
  26.  
  27. Function GetInfo (InfType As Integer) As String
  28.     Select Case InfType
  29.         Case 1
  30.             GetInfo = " " + Format$(Now, "MMM d") + " "
  31.         Case 2
  32.             GetInfo = " " + Format$(Now, "h:mm AM/PM") + " "
  33.         Case 3
  34.             GetInfo = " " + Format$(Now, "ddd") + " "
  35.         Case 4
  36.             GetInfo = " " + Format$(Now, "dddd") + " "
  37.         Case 5
  38.             GetInfo = "-"
  39.         Case 6
  40.             GetInfo = ""
  41.         Case 7
  42.             GetInfo = " " + Format$(GetFreeSystemResources%(0) / 100, "00%") + " "
  43.         Case 8
  44.             GetInfo = " " + Format$(GetFreeSpace(0) \ 1024) + " KB" + " "
  45.     End Select
  46. End Function
  47.  
  48. Function Twips_To_Pixels (ByVal N&) As Long
  49.   Twips_To_Pixels = Scale_Pixel / Scale_Twip * N&
  50. End Function
  51.  
  52.